@extends('frontend::layout')

@section('title', '评测列表')

@section('content')
    <div class="card border-no">
        <div class="card-body">
            <div class="col-lg-12 col-sm-12 col-xs-12" id="chart"></div>
            <h4 class="text-black f-20">干预训练记录--{{ $child->name }}</h4>
            <div class="table-responsive">
                <table class="table table-hover">
                    <thead>
                    <tr>
                        <th scope="col">#</th>
                        <th scope="col">干预训练项目</th>
                        <th scope="col">项目等级</th>
                        <th scope="col">项目类型</th>
                        <th scope="col">使用设备编码</th>
                        <th scope="col">用时</th>
                        <th scope="col">干预训练结果</th>
                        <th scope="col">开始时间</th>
                        <th scope="col">结束时间</th>
                    </tr>
                    </thead>
                    <tbody>
                    @if(isset($list))
                        @foreach($list as $idx => $item)
                            <tr>
                                <th scope="row">{{ $idx + 1 }}</th>
                                <td>{{ $item->game->name }}</td>
                                <td>{{ $item->grade->name }}</td>
                                <td>{{ $item->category->name }}</td>
                                <td>{{ $item->device->code }}</td>
                                <td>{{ $item->use_time }}</td>
                                <td>
                                    @if($item->result ==1)
                                    <span class="success">成功</span>
                                    @else
                                    <span class="fail">失败</span>
                                    @endif
                                </td>
                                <td>{{ $item->start_time }}</td>
                                <td>{{ $item->end_time }}</td>
                                <td>
                                    <a href="{{ route('wechat.training.view', ['id' => $item->id]) }}" class="text-primary" title="{{ __('View') }}">&nbsp;&nbsp;<i class="fa fa-eye"></i></a>

                                    <a href="{{ route('wechat.training.delete', ['id' => $item->id]) }}" class="text-danger confirm-delete" title="{{ __('Delete') }}">&nbsp;&nbsp;<i class="fa fa-trash-o"></i></a>

                                </td>
                            </tr>
                        @endforeach
                    @endif
                    </tbody>
                </table>
            </div>
            <div class="row">
                <div class="clearfix"></div>
                <div class="col-md-12 col-sm-12 col-xs-12 pull-right">
                    @if(isset($list))
                        {{ $list->links() }}
                    @endif
                </div>
            </div>
        </div>
    </div>
@stop